package van.planifolia.dynamicproxy;

/**
 * Created by Intellij IDEA<br>
 *
 * @author Planifolia.Van
 * @version 1.0
 * @date 2022/11/9 18:05
 */
public class Test {
    public static void main(String[] args) {
        // jdk动态代理
        JDKProxy jdkProxy = new JDKProxy(new ComputerImpl());
        Computer jdkProxyProxyBean = jdkProxy.getProxyBean();
        System.out.println(jdkProxyProxyBean.multiply(9, 6));
        // cglib动态代理
        CglibProxy cglibProxyBean = new CglibProxy(new ComputerImpl());
        Computer proxyBean = cglibProxyBean.getProxyBean();
        System.out.println(proxyBean.add(1, 15));
    }
}
